package mywebapp.tools.jsf;

public class ERROR_JSF
{
  protected static String nl;
  public static synchronized ERROR_JSF create(String lineSeparator)
  {
    nl = lineSeparator;
    ERROR_JSF result = new ERROR_JSF();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "";
  protected final String TEXT_2 = "\" %>";
  protected final String TEXT_3 = NL;
  protected final String TEXT_4 = "\" %>";
  protected final String TEXT_5 = NL;
  protected final String TEXT_6 = "\" %>" + NL + "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> " + NL + "" + NL + "<f:view>" + NL + "<f:loadBundle basename=\"contacts.messages\" var=\"msg\" />" + NL + "  <html>" + NL + "\t<head>" + NL + "\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">" + NL + "\t\t<title><h:outputText value=\"#{msg.errorTitle}\" /></title>" + NL + "\t</head>" + NL + "\t<body>" + NL + "  \t\t<h1><h:outputText value=\"#{msg.failedAction}\" /></h1>" + NL + "\t</body>" + NL + "  </html> " + NL + "</f:view>";

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    stringBuffer.append(TEXT_1);
    stringBuffer.append( "<%@ page language=\"java\" contentType=\"text/html; charset=ISO-8859-1\" pageEncoding=\"ISO-8859-1");
    stringBuffer.append(TEXT_2);
    stringBuffer.append(TEXT_3);
    stringBuffer.append( "<%@ taglib prefix=\"f\" uri=\"http://java.sun.com/jsf/core");
    stringBuffer.append(TEXT_4);
    stringBuffer.append(TEXT_5);
    stringBuffer.append( "<%@ taglib prefix=\"h\" uri=\"http://java.sun.com/jsf/html");
    stringBuffer.append(TEXT_6);
    return stringBuffer.toString();
  }
}
